<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <div id="parent">
        hello world
        <p id="first">good</p>
        <p>ahha</p>
        <p>yooo</p>
    </div>
    <script>
        // childNode 获取子节点 不区分文本节点和元素节点。
        // children  只获取元素节点
        // nextSibling->获取下一个兄弟节点
        // nextElementSibling->获取下一个元素兄弟节点
        var parent=document.getElementById("parent")
        var childs=parent.children;
        var first =document.getElementById("first");
        console.log(childs);
        console.log(first.nextElementSibling);
    </script>
</body>
</html>